s = 'hello world'

s1 = s[0:5:2]#0到5不包含5，步长为2
for i in range(0,len(s1)):
    print(i,s1[i],end='\t\t')
print('\n')

print(s[:5:1])

print(s[:5:])

print(s[0::1])

print(s[5::])
print(s[5:])#与14行代码相同